#include <iostream>
using namespace std;
int main() {
  int m, n;
  cin >> m >> n;
  auto akm = [](auto &self, int m, int n) {
    if (m == 0) return n + 1;
    if (n == 0) return self(self, m - 1, 1);
    return self(self, m - 1, self(self, m, n - 1));
  };
  cout << akm(akm, m, n) << endl;
}